package cn.wolfcode.wolf2w.business.util;

import lombok.Getter;

@Getter
public enum ConsumeType {
    TYPE1(1,1,999),
    TYPE2(2,1000,6000),
    TYPE3(3,6001,20000),
    TYPE4(4,20001,Integer.MAX_VALUE);

    private Integer type;
    private Integer min;
    private Integer max;

    ConsumeType(Integer type, Integer min, Integer max) {
        this.type = type;
        this.min = min;
        this.max = max;
    }

    public static ConsumeType getConsumeByType(Integer type){
        for (ConsumeType value: ConsumeType.values()){
            if (value.getType().equals(type)){
                return value;
            }
        }
        return null;
    }
}
